<%@page contentType="text/html; charset=utf-8"%>
<script>
    $(function(){
        $.each($(".nav_header"),function(){
            $(this).css("display","none");
        })

        $(".select_condition").on("click",function(){
            var $select = $(this);
            var type = $select.data("type");
            $.each($("span.fa.fa-caret-up"),function(){
                $(this).removeClass("fa-caret-up").addClass("fa-caret-down");
            })
            $.each($(".nav_header"),function(){
                var $this =  $(this);
                if($this.hasClass(type)) {
                    if ($this.css("display")=="none") {
                        $this.css("display", "block");
                        $select.find("span").removeClass("fa-caret-down").addClass("fa-caret-up");
                    } else {
                        $this.css("display", "none");
                    }
                }else if($this.css("display")=="block"){
                    $this.css("display","none");
                }
            });
        });

    })
</script>